<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Thông tin cá nhân</title>
</head>

<body>

<?php 
	$id = $_REQUEST["id"];
	$page = $_REQUEST["page"];
	include("include/db_connect.php");
	$query = mysql_query("Select * from dc_tour where TID = '".$id."'");
	$result = mysql_fetch_array($query);
?>
<form action="editTour.php?id=<?php echo $id; ?>" method="post" enctype="multipart/form-data">
	<table>
	<tr>
		<th></th>
		<th>Thông tin hiện tại</th>
		<th>Thông tin mới</th>
	</tr>
	<tr>
		<td>ID</td>
		<td><?php echo $result[0]; ?></td>
		<td><input type="text" class="text" name="txtTID" id="txtTID" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Tên tour</td>
		<td><?php echo $result[1]; ?></td>
		<td><input type="text" class="text" name="txtName" id="txtName" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Địa điểm</td>
		<td><?php echo $result[2]; ?></td>
		<td><input type="text" class="text" name="txtPlace" id="txtPlace" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Nội dung</td>
		<td><?php echo $result[3]; ?></td>
		<td><textarea name="txtContent" rows="10" cols="50" wrap="off"></textarea></td>
	</tr>
	<tr>
		<td>Ảnh minh họa</td>
		<td><img src=<?php echo $result[4]; ?> alt="chưa có ảnh" /> </td>
		<td><input type="file" id="image" name="image" size="50" maxlength="100000" accept="text/*" /></td>
	</tr>
	<tr>
		<td>Tổng chi phí</td>
		<td><?php echo $result[5]; ?></td>
		<td><input type="text" class="text" name="txtPrice" id="txtPrice" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Khuyến mại</td>
		<td><?php echo $result[6]; ?></td>
		<td><input type="text" class="text" name="txtDiscount" id="txtDiscount" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Số lượng tối đa</td>
		<td><?php echo $result[7]; ?></td>
		<td><input type="text" class="text" name="txtNumber" id="txtNumber" value="" size="" maxlength="" /></td>
	</tr>
	<tr>
		<td>Nhà cung cấp</td>
		<td><?php echo $result[8]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Trạng thái</td>
		<td><?php echo $result[9]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày bắt đầu</td>
		<td><?php echo $result[10]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày kết thúc</td>
		<td><?php echo $result[11]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày gửi</td>
		<td><?php echo $result[12]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày duyệt</td>
		<td><?php echo $result[13]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày bắt đầu đăng kí</td>
		<td><?php echo $result[14]; ?></td>
		<td></td>
	</tr>
	<tr>
		<td>Ngày hết hạn đăng kí</td>
		<td><?php echo $result[15]; ?></td>
		<td></td>
	</tr>
</table>
<img id="captcha" src="securimage/securimage_show.php" alt="CAPTCHA Image" /><br />
	<input type="text" name="captcha_code" size="10" maxlength="6" />
	<a href="#" onclick="document.getElementById('captcha').src = 'securimage/securimage_show.php?' + Math.random(); return false">[ Different Image ]</a><br />
<input type="submit" class="submit button" name="btnEditTour" value="Lưu thay đổi" />
<input type="reset" class="reset button" name="btnReset" value="Nhập lại" />
<a href="tourList.php?page=<?php echo $page;?>"><input type="button" class="button" name="btnBack" value="Quay lại" /></a>
</form>
</body>
</html>
